1. Field of the Invention
The present invention relates to a microcomputer malfunction preventive apparatus and a microcomputer malfunction preventive method for preventing a malfunction of a microcomputer due to variations in a supply voltage.
2. Description of Related Art
FIG. 7 is a block diagram showing a configuration of a conventional microcomputer malfunction preventive apparatus. In FIG. 7, the reference numeral 1 designates an external power supply such as an ordinary power supply unit or a battery; 2 designates a regulator for regulating a voltage supplied from the external power supply 1 to a microcomputer 4; and 3 designates a capacitor such as a bypass capacitor for supplying power to the microcomputer 4 in case of transient power shortage of the external power supply 1.
The reference numeral 4 designates the microcomputer; 5 designates an internal power supply built in the microcomputer 4; and 6 designates a capacitor connected to a power line to the microcomputer 4 for eliminating the transient power shortage just as the capacitor 3.
Next, the operation of the conventional apparatus will be described.
To stabilize the power supplied to the microcomputer 4, the malfunction preventive apparatus includes not only the external power supply 1, but also the regulator 2 for stabilizing the voltage supplied to the microcomputer 4, besides the internal power supply 5 installed in the microcomputer 4.
In addition, to prevent the malfunction of the microcomputer 4 caused by a voltage reduction because of the transient power shortage in the external power supply 1 or in internal power supply 5, the capacitors 3 and 6 are connected to the power line to the microcomputer 4, thereby eliminating the transient power supply shortage.
However, installing the regulator 2 outside the microcomputer 4 is contrary to an increasing miniaturization of a recent semiconductor board, and mounting a large capacitor 6 on the power line to the microcomputer 4 becomes increasingly difficult because of the recent trend toward further thinning the line width of semiconductor components.
Furthermore, the built-in capacitors 3 and 6 cannot cope with an unexpected power supply shortage. In other words, the preventive measure against the transient power shortage using only the capacitors 3 and 6 has its own limit.
Therefore, it is essential for implementing a necessary and sufficient measure against the transient instability of the power supply to install a stabilized power supply unit outside the microcomputer 4.
With the foregoing arrangement, although the conventional microcomputer malfunction preventive apparatus can handle the power shortage within the expected range, it cannot cope with the power shortage beyond the expected range. Thus, to prevent the malfunction of the microcomputer 4 involved in the power supply instability, it is necessary to install a stabilized power supply unit outside the microcomputer 4, which presents a problem of increasing the dimension of the semiconductor board.
In addition to the foregoing conventional technique, Japanese patent application laid-open Nos. 8-181590/1996 and 5-108194/1993 each disclose a technique of halting the clock supply to a microcomputer when the supply voltage falls below a reference voltage in order to prevent the malfunction of the microcomputer caused by the power supply instability.
Although these techniques can handle the malfunction of the microcomputer due to a gradual reduction in the supply voltage, they cannot cope with the malfunction of the microcomputer resulting from a sudden change in the supply voltage even if the supply voltage is above the reference voltage.
The present invention is implemented to solve the foregoing problems. It is therefore an object of the present invention to provide a microcomputer malfunction preventive apparatus and a microcomputer malfunction preventive method capable of preventing the malfunction of a microcomputer involved in power supply instability without installing a competent stabilized power supply outside the microcomputer.
According to a first aspect of the present invention, there is provided a microcomputer malfunction preventive apparatus comprising: a fluctuation detector for detecting fluctuations in a supply voltage; and a clock controller for halting supplying a clock signal to a microcomputer when the fluctuations detected by the fluctuation detector deviate from an acceptable range, and for resuming supplying the clock signal to the microcomputer when the fluctuations return to the acceptable range.
Here, the fluctuation detector may comprise: a first bias circuit connected to a power line; a second bias circuit connected to the power line, and having a time constant different from that of the first bias circuit; and a comparator for comparing an output voltage of the first bias circuit with an output voltage of the second bias circuit.
The microcomputer malfunction preventive apparatus may further comprise a voltage detector for detecting the supply voltage, wherein the clock controller may continue halting the supply of the clock signal to the microcomputer if the supply voltage detected by the voltage detector is lower than a reference voltage even after the fluctuations detected by the fluctuation detector return to the acceptable range after the supply of the clock signal to the microcomputer has been halted.
The microcomputer malfunction preventive apparatus may further comprise a voltage detector for detecting the supply voltage, wherein the clock controller may supply the microcomputer with a secondary clock signal with a frequency lower than a frequency of the clock signal if the supply voltage detected by the voltage detector is lower than a reference voltage even after the fluctuations detected by the fluctuation detector return to the acceptable range after the clock controller halts the supply of the clock signal to the microcomputer.
The microcomputer malfunction preventive apparatus may further comprise a voltage detector for detecting the supply voltage; and a reset circuit for resetting the microcomputer when the supply voltage detected by the voltage detector falls below a reference voltage after the clock controller halts supplying the clock signal to the microcomputer.
The microcomputer malfunction preventive apparatus may further comprise: a voltage detector for detecting the supply voltage; and an interrupt controller for generating an interrupt signal when the supply voltage detected by the voltage detector falls below a reference voltage after the clock controller halts supplying the clock signal to the microcomputer.
According to a second aspect of the present invention, there is provided a microcomputer malfunction preventive method comprising the steps of: monitoring fluctuations in a supply voltage; halting supplying a clock signal to a microcomputer when the fluctuations in the supply voltage deviate from an acceptable range; and resuming supplying the clock signal to the microcomputer when the fluctuations return to the acceptable range.
Here, the microcomputer malfunction preventive method may further comprise the step of continuing halting the supply of the clock signal to the microcomputer if the supply voltage is lower than a reference voltage even after the fluctuations in the supply voltage return to the acceptable range after the supply of the clock signal to the microcomputer has been halted.
The microcomputer malfunction preventive method may further comprise the step of supplying the microcomputer with a secondary clock signal with a frequency lower than that of the clock signal if the supply voltage is lower than a reference voltage even after the fluctuations in the supply voltage return to the acceptable range after the supply of the clock signal to the microcomputer has been halted.
The microcomputer malfunction preventive method may further comprise the step of resetting the microcomputer when the supply voltage falls below a reference voltage after the supply of the clock signal to the microcomputer has been halted.
The microcomputer malfunction preventive method may further comprise the step of generating an interrupt signal when the supply voltage falls below a reference voltage after the supply of the clock signal to the microcomputer has been halted.